<?php


class QSobjectPropertyType
{
	/**
	 * The id of the property definition
	 *
	 * @var integer
	 */
	private $id;
	/**
	 * The name of the property
	 *
	 * @var string
	 */
	private $name;
	/**
	 * The owner object type
	 *
	 * @var QSobjectType
	 */
	private $parent;
	/**
	 * True if the property contains an array 
	 * If so the accepted types are for the array
	 *
	 * @var boolean
	 */
	private $is_array;
	/**
	 * The array of accepted types for the property type
	 *
	 * @var array
	 */
	private $accepted_types;
	
	public function __construct(QSobjectType $parent, $property_row)
	{
		$this->parent = $parent;
		
		$this->id = $property_row["id"];
		$this->name = $property_row["name"];
		$this->is_array = $property_row["is_array"];
	}
	
	public function addAcceptedType(QSobjectType $type)
	{
		if (!isset($this->accepted_types))
			$this->accepted_types = array();
			
		$this->accepted_types[] = $type;
	}
}


?>